package gov.nist.ssd.swqb.core.search;

import com.hp.hpl.jena.rdf.model.Model;
import static gov.nist.ssd.swqb.util.Static.concat;


class LitteralLuceneSearch extends AbstractSelectSearch {

  public LitteralLuceneSearch (LuceneMatchText searchText, Model model, int requestsSize) {
	  super(searchText,
	        model,
	        requestsSize,
	        varName("x"),
	        searchPattern(
	          concat(
	            "PREFIX pf: <http://jena.hpl.hp.com/ARQ/property#>",
	            "SELECT DISTINCT ?x",
	            "WHERE {",
	            "  ?x pf:textMatch \'%1$s\' .",
	            "  ?a ?b ?x .",
	            "}"
	          )
	        )
	      );
	}
}
